#pragma once

typedef struct NODE
{
	unsigned char character;
	int freg;
	bool used;
	int nleft,nright;

	NODE()
	{
		character=0;
		freg=0;
		used=false;
		nleft=nright=-1;
	}
}Node;

class CompressHuffman
{
	int size;
public:
	CompressHuffman(void);
	unsigned char* ReadFile(char* path);
	Node* BuildHufftree(Node *,int&);
	bool Compress(char* path);
	bool Extract(char* pathsource,char* pathdest,char* pathinfo);
	~CompressHuffman(void);
};

